import React, { Fragment } from 'react';
import { BrowserRouter, Route, withRouter } from 'react-router-dom';

import Login from './views/Login/login.js'; // 登录
import ForgetPassword from './views/Login/ForgetPassword/forgetPassword.js'; // 忘记密码
import Main from './views/Main/main.js'; // 家长首页
import MainTutor from './views/Main/mainTutor.js'; // 家教首页
import SignUp from './views/Login/SignUp/signUp.js'; // 注册家长
import SignUpTutor from './views/Login/SignUpTutor/signUpTutor.js'; // 注册家教
import Student from './views/Student/student.js'; // 创建学生信息
import StudentDetails from './views/Student/StudentDetails/studentDetails.js'; // 学生信息详情
import Publish from './views/Publish/publish.js'; // 找老师
import Role from './views/Login/Role/role.js'; // 
import BiographicalNotes from "./views/BiographicalNotes/biographicalNotes.js" // Other 列表 页面
import Evaluation from "./views/Evaluation/evaluation.js" // 家教测评页面
import PayOfVip from './views/Pay/payOfVip.js'; //
import payOfOrder from './views/Pay/payOfOrder.js'; // 订单支付
import fn from "./views/a.js"
import SuccessPay from "./views/result/successPay"
import FailPay from "./views/result/failPay"
import MyOfParent from "./views/My/parent/myOfParent"
import LookForTutor from "./views/Order/parent/LookForTutor";
import BiographicalNotesDetails from "./views/BiographicalNotes/biographicalNotesDetails/biographicalNotesDetails.js" // 简历详情

import OrderDetailsOfSelect from "./views/Order/parent/parentOrderDetails/orderDetailsOfSelect"; // 家长选择家教

import OrderList from "./views/Order/tutor/orderList.js"; // 订单列表
import OrderDetails from "./views/Order/tutor/tutorOrderDetails/orderDetails";
import HistoryOrdersOfParent from "./views/Order/parent/HistoryOrdersOfParent"; // 订单列表详情
import RefundSelect from "./views/Refund/refundSelect"; // 退款订单选择 
import RefundList from "./views/Refund/refundList"; // 退款订单列表

import RefundDetails from "./views/Refund/refundDetails"; // 退款订单选择
import OrderDetailsOfHistory from "./views/Order/parent/parentOrderDetails/orderDetailsOfHistory"; // 订单列表详情
import Demo from "./views/test/test"
import TeachingOrdersOfParent from "./views/Order/parent/TeachingOrdersOfParent";
import OrderDetailsOfTeaching from "./views/Order/parent/parentOrderDetails/orderDetailsOfTeaching";
import MessagesOfParent from "./views/Message/parent/MessagesOfParent"
import MessagesOfTutor from "./views/Message/tutor/MessagesOfTutor"
import MessageDetailsOfParent from "./views/Message/parent/show/MessageDetailsOfParent";
import MessageDetailsOfTutor from "./views/Message/tutor/show/MessageDetailsOfTutor";

import Help from "./views/Help/help.js"; // 帮助列表
import HelpDetails from "./views/Help/helpDetails/helpDetails.js"; // 帮助详情

import UserInfo from "./views/UserInfo/userInfo.js"; // 家教个人信息 
import UpdataUserInfo from "./views/UserInfo/updataUserInfo.js"; // 编辑家教个人信息 
import UserInfoParent from "./views/UserInfo/parent/userInfo.js"; // 家长个人信息
import UpdataUserInfoParent from "./views/UserInfo/parent/updataUserInfo.js"; // 修改家长个人信息
import HistoryOrdersOfTutor from "./views/Order/tutor/HistoryOrdersOfTutor";
import HistoryOrderDetailsOfTutor from "./views/Order/tutor/tutorOrderDetails/HistoryOrderDetailsOfTutor";
import WorkingOrdersOfTutor from "./views/Order/tutor/WorkingOrdersOfTutor";
import WorkingOrderDetailsOfTutor from "./views/Order/tutor/tutorOrderDetails/WorkingOrderDetailsOfTutor";
import OrderMarket from "./views/Order/tutor/OrderMarket";
import PreOrderOfTutor from "./views/Order/tutor/PreOrderOfTutor";
import MaterialsDetails from "./views/Help/helpDetails/learningMaterials"; // 学前资料

import ResumeList from "./views/UserInfo/resumeList"; // 简历列表

import StudentList from "./views/UserInfo/studentList"; // 学生列表

import CommonPoblem from "./views/Help/CommonPoblem/commonPoblem"; // 常见问题

import CustomerService from "./views/Help/CustomerService/customerService"; // 客服中心


import OrderDetailsOfEdit from "./views/Order/parent/parentOrderDetails/orderDetailsOfEdit"; // 订单编辑
import OrderDetailsOfPublish from "./views/Order/parent/parentOrderDetails/orderDetailsOfPublish"; // 待定订单


function App () {

    return (
        <Fragment>
            <div>
                <Route path='/' exact component={Role}></Route>
                <Route path='/login/:role' exact component={Login}></Route> {/* role：['ADMIN', 'PARENT', 'TUTOR'] // 角色 【管理员 / 家长 / 家教】  */}
                <Route path='/forgetPassword' exact component={ForgetPassword}></Route>
                <Route path='/signUp' exact component={SignUp}></Route>
                <Route path='/signUpTutor' exact component={SignUpTutor}></Route>
                <Route path='/student' exact component={Student}></Route>
                <Route path='/studentDetails' exact component={StudentDetails}></Route>
                <Route path='/publish' exact component={Publish}></Route>

                <Route path='/main' exact component={Main}></Route>
                <Route path='/mainTutor' exact component={MainTutor}></Route>


                <Route path='/biographicalNotes' exact component={BiographicalNotes}></Route>
                <Route path='/biographicalNotesDetails' exact component={BiographicalNotesDetails}></Route>

                <Route path='/evaluation' exact component={Evaluation}></Route>


                <Route path="/fn" component={fn} ></Route>

                {/*支付的测试页面*/}
                <Route path="/payOfVip" component={PayOfVip} ></Route>
                <Route path="/payOfOrder" component={payOfOrder} ></Route>

                {/*找家教*/}
                <Route path='/lookForTutor' exact component={LookForTutor}></Route>
                <Route path="/successPay" component={SuccessPay} ></Route>
                <Route path="/failPay" component={FailPay} ></Route>
                <Route path='/myParent' exact component={MyOfParent}></Route>

                <Route path='/orderList' exact component={OrderList}></Route>
                <Route path='/orderDetails' exact component={OrderDetails}></Route>
                <Route path='/orderDetailsOfSelect' exact component={OrderDetailsOfSelect}></Route>

                {/*历史订单列表*/}
                <Route path='/historyOrdersOfParent' exact component={HistoryOrdersOfParent}></Route>
                {/*历史订单详情*/}
                <Route path='/ordersHistoryDetailsOfParent' exact component={OrderDetailsOfHistory}></Route>

                {/* 家教 */}
                <Route path='/refundSelect' exact component={RefundSelect}></Route> {/* 退款选择 */}
                <Route path='/refundDetails' exact component={RefundDetails}></Route> {/* 退款详情 */}
                <Route path='/refundList' exact component={RefundList}></Route> {/* 家教申请退款列表页 */}

                <Route path='/orderMarket' exact component={OrderMarket}></Route> {/* 可供报名的订单列表 */}

                <Route path='/preOrder' exact component={PreOrderOfTutor}></Route> {/* 家教的待定订单列表 */}

                <Route path='/historyOrdersOfTutor' exact component={HistoryOrdersOfTutor}></Route> {/* 家教历史订单 */}
                <Route path='/historyOrderDetailsOfTutor' exact component={HistoryOrderDetailsOfTutor}></Route> {/* 家教历史订单详情页 */}

                <Route path='/workingOrdersOfTutor' exact component={WorkingOrdersOfTutor}></Route> {/* 家教正在教学的订单 */}
                <Route path='/workingOrderDetailsOfTutor' exact component={WorkingOrderDetailsOfTutor}></Route> {/* 家教正在教学订单详情页 */}



                {/*正在教学的订单列表*/}
                <Route path='/teachingOrdersOfParent' exact component={TeachingOrdersOfParent}></Route>
                {/*正在教学订单的详情*/}
                <Route path='/orderDetailsTeachingOfParent' exact component={OrderDetailsOfTeaching}></Route>

                {/*家长消息列表*/}
                <Route path='/messagesOfParent' exact component={MessagesOfParent}></Route>
                {/*家长消息详情*/}
                <Route path='/messageDetailsOfParent' exact component={MessageDetailsOfParent}></Route>


                {/*家教消息列表*/}
                <Route path='/messagesOfTutor' exact component={MessagesOfTutor}></Route>
                {/*家教消息详情*/}
                <Route path='/messageDetailsOfTutor' exact component={MessageDetailsOfTutor}></Route>

                {/* 帮助 */}
                <Route path='/help' exact component={Help}></Route>
                <Route path='/helpDetails' exact component={HelpDetails}></Route>

                {/* 常见问题 */}
                <Route path='/commonPoblem' exact component={CommonPoblem}></Route>

                {/* 客服中心 */}
                <Route path='/customerService' exact component={CustomerService}></Route>

                {/* 学前资料 */}
                <Route path='/materialsDetails' exact component={MaterialsDetails}></Route>

                {/* 简历列表 */}
                <Route path='/resumeList' exact component={ResumeList}></Route>

                {/* 学生列表 */}
                <Route path='/studentList' exact component={StudentList}></Route>

                {/*家教个人信息 */}
                <Route path='/userInfo' exact component={UserInfo}></Route>

                {/*编辑家教个人信息*/}
                <Route path='/updataUserInfo' exact component={UpdataUserInfo}></Route>

                {/* 家长个人信息 */}
                <Route path='/userInfoParent' exact component={UserInfoParent}></Route>

                {/*编辑家教个人信息*/}
                <Route path='/updataUserInfoParent' exact component={UpdataUserInfoParent}></Route>

                {/* 订单编辑 */}
                <Route path='/OrderDetailsOfEdit' exact component={OrderDetailsOfEdit}></Route>

                {/* 待定订单 */}
                <Route path='/OrderDetailsOfPublish' exact component={OrderDetailsOfPublish}></Route>
            </div>
        </Fragment>
    );
}

export default App;
